<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administracion</title>
<link rel="stylesheet" type="text/css"  href="css/admin.css"/>
</head>

<body>
<div>
<h1>Cursos</h1>
<h2>Eliminar Curso</h2>

<?php
require("include/user-info.php");

$cursoId = $_POST["id"];
require("include/conection.php");
$result = mysql_query("DELETE FROM curso WHERE id = '".$cursoId."'");

if (!$result) {
	die('Error al Borrar: ' . mysql_error());
}
else 
{	
	echo "<h3> El curso se ha borrado correctamente</h3>";
	echo "<a href=\"cursos-select.php\">Regresar</a>";
}	
mysql_close($con);
?>

</div>
</body>
</html>